package com.kexinde.wjifen.dao.impl;

import java.util.List;

import org.springframework.stereotype.Component;

import com.kexinde.wjifen.model.Activity;

@Component("activityDao")
public class ActivityDao extends BaseDao<Activity> {
	
	@SuppressWarnings("unchecked")
	public Activity findById(long id){
		List<Activity> activities = hibernateTemplate.find("from Activity a where a.id="+id);
		if(null == activities || 0 == activities.size()){
			return null;
		}
		return activities.get(0);
	}
}
